import React, { PureComponent } from 'react';
import { getUploadToken } from '../../../services/uploadfile';
import { connect } from 'dva';
import {
   Table, Button,Row,Col,Pagination
} from 'antd';
import styles from './style.less';
import PageHeaderLayout from '../../../layouts/PageHeaderLayout';

export default class WriterAdddedList extends PureComponent {
  state = {
    loadMethod:()=>{},
    addWriter:(recode)=>{},
  };

  handleTableChange = (page, pageSize) => {
    //this.props.onAddedTabChange(page, pageSize);
  }


render() {
    let {checkUserListData,total ,pageNo ,pageSize,delAddedWriter} = this.props;

    const addWriterColumns = [{
      title: '昵称',
      dataIndex: 'nickName',
      key: 'nickName',
      }, {
        title: '账号(手机号)',
        dataIndex: 'phone',
        key: 'phone',
      }, {
      title: '操作',
      dataIndex: 'id',
      key: 'id',
      render: (text, record,index) => (
          <span>
            <a href="javascript:void(0)" onClick={() => delAddedWriter(index)}>删除</a>
          </span>
        ),
    }];

    const paginationProps = {
      pageSize:pageSize,
      total:total,
      current:pageNo,
      onChange:this.handleTableChange
    };

    return (
      <div>
        <Row gutter={16}>
          <Col className="gutter-row" span={24}>
            <Table dataSource={checkUserListData} columns={addWriterColumns} style={{ width: '100%' }}
                   pagination={paginationProps}  />
          </Col>
        </Row>
      </div>
    );
  }
}
